unit Ufunciona;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, Grids, DBGrids;

type
  TFfunciona = class(TForm)
    DBGrid1: TDBGrid;
    BitBtn1: TBitBtn;
    BitBtn2: TBitBtn;
    BitBtn3: TBitBtn;
    BitBtn4: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure BitBtn2Click(Sender: TObject);
    procedure BitBtn3Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Ffunciona: TFfunciona;
  inclusao, alteracao, exclusao : boolean;

implementation

uses Ufuncionamanutencao,udados;
{$R *.dfm}

procedure TFfunciona.BitBtn1Click(Sender: TObject);
begin
inclusao := true;
application.createform(tffuncionamanutencao,ffuncionamanutencao);
ffuncionamanutencao.ShowModal;
ffuncionamanutencao.Release;
inclusao := false;

end;

procedure TFfunciona.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if key=#13 then
     SelectNext(ActiveControl,true,true);
  if key=#27 then
     close;

end;

procedure TFfunciona.BitBtn2Click(Sender: TObject);
begin
alteracao := true;
application.createform(tffuncionamanutencao,ffuncionamanutencao);
ffuncionamanutencao.ShowModal;
ffuncionamanutencao.Release;
alteracao := false;

end;

procedure TFfunciona.BitBtn3Click(Sender: TObject);
begin
exclusao := true;
application.createform(tffuncionamanutencao,ffuncionamanutencao);
ffuncionamanutencao.ShowModal;
ffuncionamanutencao.Release;
exclusao := false;

end;

end.
